<template>
    <vol-box
:lazy="true"
v-model="model2"
title="入库"
:width="500"
:padding="5"
:onModelClose="onModelClose"
>
<div style="display: flex;justify-content: center;align-items: center;height: 40px;">
  <label style="font-size: 18px;height: 30px;">选择位置：</label><input style="font-size: 15px;height: 30px;width: 250px;" type="text" placeholder="输入将刀具放到中央刀库的位置" v-model="inputLocationValue" />
</div>


<template #footer>
  <el-button type="primary" size="small" @click="sure()"
    >确认</el-button
  >
  <el-button type="default" size="small" @click="model2 = false"
    >关闭</el-button
  >
</template>
</vol-box>
</template>
  <script>
import VolBox from '@/components/basic/VolBox.vue';
import { ref, defineComponent } from 'vue';
  export default defineComponent({
    components: {
      VolBox
    },
    setup(props, context) {
        const inputLocationValue = ref(0);
        const currentRow = ref();
      const sure = () => {
        context.emit('parentCall', ($parent) => {
            $parent.getLocation(currentRow.value,inputLocationValue.value);
               
            
        });
      };
      const model2 = ref(false);

      const open = (row) => {
        model2.value = true;
        currentRow.value=row;
      };
      const close = () => {
        model2.value = false;
      };

      return {sure, open,close,currentRow, inputLocationValue,model2 };
    }
  });
  </script>
  


<!-- <template>
        <vol-box
    :lazy="true"
    v-model="model2"
    title="入库"
    :width="500"
    :padding="5"
    :onModelClose="onModelClose"
  >
    <h2>
        入库位置
    </h2>
    <label>选择位置：</label><input type="text" placeholder="输入将刀具放到中央刀库的位置" v-text="location" />

    <template #footer>
      <el-button type="primary" size="small" @click="sure()"
        >确认</el-button
      >
      <el-button type="default" size="small" @click="model2 = false"
        >关闭弹</el-button
      >
    </template>
  </vol-box>
</template>

<script>
import VolBox from '@/components/basic/VolBox.vue';
import { ref, defineComponent } from 'vue';
export default defineComponent({
        components:{
            VolBox
        },
        data:function(){
            return {
                location:0
            }
        },
        setup(props, context) {
       
       const sure=()=>{
        $parent.getLocation(this.location);
                model2 = false;
            };
            const model2 = ref(false);
          const  open=(row)=>{
                model2.value=true;
            };
        
       
        
        return {open,open};
        }
});
</script>

<style scoped>

</style> -->